diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 868561b..bbf3409 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -36,35 +36,38 @@
  * @param	string	path to file
  * @return	string
  */	
-function read_file($file)
+if (! function_exists('read_file'))
 {
-	if ( ! file_exists($file))
+	function read_file($file)
 	{
-		return FALSE;
-	}
+		if ( ! file_exists($file))
+		{
+			return FALSE;
+		}
 	
-	if (function_exists('file_get_contents'))
-	{
-		return file_get_contents($file);		
-	}
+		if (function_exists('file_get_contents'))
+		{
+			return file_get_contents($file);		
+		}
 
-	if ( ! $fp = @fopen($file, 'rb'))
-	{
-		return FALSE;
-	}
+		if ( ! $fp = @fopen($file, 'rb'))
+		{
+			return FALSE;
+		}
 		
-	flock($fp, LOCK_SH);
+		flock($fp, LOCK_SH);
 	
-	$data = '';
-	if (filesize($file) > 0)
-	{
-		$data =& fread($fp, filesize($file));
+		$data = '';
+		if (filesize($file) > 0)
+		{
+			$data =& fread($fp, filesize($file));
+		}
+
+		flock($fp, LOCK_UN);
+		fclose($fp);
+
+		return $data;
 	}
-
-	flock($fp, LOCK_UN);
-	fclose($fp);
-
-	return $data;
 }
 	
 // ------------------------------------------------------------------------
@@ -80,19 +83,22 @@
  * @param	string	file data
  * @return	bool
  */	
-function write_file($path, $data, $mode = 'wb')
+if (! function_exists('write_file'))
 {
-	if ( ! $fp = @fopen($path, $mode))
+	function write_file($path, $data, $mode = 'wb')
 	{
-		return FALSE;
-	}
+		if ( ! $fp = @fopen($path, $mode))
+		{
+			return FALSE;
+		}
 		
-	flock($fp, LOCK_EX);
-	fwrite($fp, $data);
-	flock($fp, LOCK_UN);
-	fclose($fp);	
+		flock($fp, LOCK_EX);
+		fwrite($fp, $data);
+		flock($fp, LOCK_UN);
+		fclose($fp);	
 
-	return TRUE;
+		return TRUE;
+	}
 }
 	
 // ------------------------------------------------------------------------
@@ -110,34 +116,37 @@
  * @param	bool	whether to delete any directories found in the path
  * @return	bool
  */	
-function delete_files($path, $del_dir = FALSE, $level = 0)
-{	
-	// Trim the trailing slash
-	$path = preg_replace("|^(.+?)/*$|", "\\1", $path);
+if (! function_exists('delete_files'))
+{
+	function delete_files($path, $del_dir = FALSE, $level = 0)
+	{	
+		// Trim the trailing slash
+		$path = preg_replace("|^(.+?)/*$|", "\\1", $path);
 			
-	if ( ! $current_dir = @opendir($path))
-		return;
+		if ( ! $current_dir = @opendir($path))
+			return;
 	
-	while(FALSE !== ($filename = @readdir($current_dir)))
-	{
-		if ($filename != "." and $filename != "..")
+		while(FALSE !== ($filename = @readdir($current_dir)))
 		{
-			if (is_dir($path.'/'.$filename))
+			if ($filename != "." and $filename != "..")
 			{
-				$level++;
-				delete_files($path.'/'.$filename, $del_dir, $level);
-			}
-			else
-			{
-				unlink($path.'/'.$filename);
+				if (is_dir($path.'/'.$filename))
+				{
+					$level++;
+					delete_files($path.'/'.$filename, $del_dir, $level);
+				}
+				else
+				{
+					unlink($path.'/'.$filename);
+				}
 			}
 		}
-	}
-	@closedir($current_dir);
+		@closedir($current_dir);
 	
-	if ($del_dir == TRUE AND $level > 0)
-	{
-		@rmdir($path);
+		if ($del_dir == TRUE AND $level > 0)
+		{
+			@rmdir($path);
+		}
 	}
 }
 
@@ -154,25 +163,28 @@
  * @param	bool	whether to include the path as part of the filename
  * @return	array
  */	
-function get_filenames($source_dir, $include_path = FALSE)
+if (! function_exists('get_filenames'))
 {
-	$_filedata = array();
-	
-	if ($fp = @opendir($source_dir))
+	function get_filenames($source_dir, $include_path = FALSE)
 	{
-		while (FALSE !== ($file = readdir($fp)))
+		$_filedata = array();
+	
+		if ($fp = @opendir($source_dir))
 		{
-			if (@is_dir($source_dir.$file) && substr($file, 0, 1) != '.')
+			while (FALSE !== ($file = readdir($fp)))
 			{
-				 get_filenames($source_dir.$file."/", $include_path);
-			}
-			elseif (substr($file, 0, 1) != ".")
-			{
+				if (@is_dir($source_dir.$file) && substr($file, 0, 1) != '.')
+				{
+					 get_filenames($source_dir.$file."/", $include_path);
+				}
+				elseif (substr($file, 0, 1) != ".")
+				{
 			
-				$_filedata[] = ($include_path == TRUE) ? $source_dir.$file : $file;
+					$_filedata[] = ($include_path == TRUE) ? $source_dir.$file : $file;
+				}
 			}
+			return $_filedata;
 		}
-		return $_filedata;
 	}
 }
 
